package org.langcom.logic;



public class Or extends LogicOperation {

	private static final long serialVersionUID = -8532101917626193346L;

	public Or() {
		this("", ""); //$NON-NLS-1$ //$NON-NLS-2$
	}

	public Or(String description, String detailedDescription) {
		super(description, detailedDescription);
	}

	public And addAnd(String description, String detailedDescription) {
		And result = new And(description,detailedDescription);
		children.add(result);
		return result;
	}
	
	public Or add(Boolean expression, String description, String detailedDescription) {
		add(new LogicValue(description, detailedDescription, expression));
		return this;
	}

	@Override
	protected boolean compare(boolean arg1, boolean arg2) {
		return arg1 || arg2;
	}

	@Override
	public String toString() {
		return Messages.OrBrackets_0+" "+super.toString(); //$NON-NLS-1$
	}
}
